Magnetic resonance force microscopy (MRFM) is an imaging technique for nanometer scale magnetic resonance images (MRI) and a spectroscopic technique for determining the environment of a nuclear or electron spin. MRFM technology maybe used in research in biological cells and molecules, biotechnology, advanced nano-materials, inorganic and organic semiconductor devices and new spin physics. The sensitivity obtained using an MRFM microscope may be 10 billion times better than a medical MRI used in hospitals. MRFM combines two technologies: (1) mechanical detection and (2) magnetic resonance. The mechanical detection referred to is the attraction between two magnets, one of which may be attached to a cantilever, which causes the cantilever to change its amplitude or frequency depending on the MRFM protocol in use. The two magnets are a magnetic particle and a sample's magnetic moments, arising from either the nuclei or electrons in the sample. Both methods may be used in MRFM.